Fs = require 'fs'
Home = require './home'
Commodity = require './commodity'
Server = require './server'

module.exports = (app) ->
  app.get '/ys/page/:page', Home
  app.get '/ys/tag/:tag/page/:page', Home
  app.get '/ys/tag/:tag', Home
  app.get '/ys', Home
  app.all '/ys/table', Commodity.table
  app.get '/ys/commodity/:id', Commodity.commodityPageHandler
  app.get '/ys/commoditymodify/:id', Commodity.commodityModifyPageHandler
  app.post '/ys/action/savecommodity', Commodity.saveCommodityHandler

  app.get '/ys/action/sendinfo', Server.sendInfo
  